-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output loudness normalization #18
Conversation
Would it maybe make sense just to expose the loudness to the plugin as a property of the model, and let the plugin apply the gain at the same time as it does the output leveling? I was hoping to actually get rid of the gain adjustment step completely in the NAM code, since it isn't currently doing anything - this would allow us to remove an extra buffer copy. Not super significant compared to the model simulation itself, but every little bit helps. |
I am not sure but I think there is quite a bit of redundant buffer copying code in the NAM plugin src, an issue for another day (and another repo) |
Not sure. Here's my thinking on it:
Happy to hear both your thoughts. |
It doesn't, no, but it does prevent removing the existing copy at both input and output for gain adjustment (that isn't currently required, because the plugin handles I/O gain adjustment). My plan was to completely get rid of "_input_post_gain" and "_core_dsp_output" and read/write directly from the buffer pointers passed to process. Removes two copies. |
It doesn't prevent it. The implementation of applying loudness could simply involve applying the gain at the point where the core dsp writes to the buffer. Or, an in-place multiplication could be done, which might read a little cleaner, but also might not compile-time optimize.
Agreed--this is a good thing to do. |
True. Still one extra multiplication pass over having the plugin apply it with output level, though. But I agree that this get into small potatoes optimization, so I'll shut up about it for now :-) |
Implements reading the
"loudness"
metadatum (if available) as well as output normalization.Resolves #16
Resolves #17